<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<select id="yearSel" onchange="change()">
		</select>
		<select id="monthSel"></select>
		<select id="daySel"></select>
		
		<script>
			
			
			
			for(var i=1990;i<=2024;i++)
			{
				var tmpOption = document.createElement("option");
				var txtNode = document.createTextNode(i+"年");
				tmpOption.appendChild(txtNode);
				yearSel.appendChild(tmpOption);
				
			}
			
			function change()
			{
				console.log(yearSel.value)
			}
			
			for(var j=1;j<=12;j++)
			{
				var tmpOption = document.createElement("option");
				var txtNode = document.createTextNode(j+"月");
				tmpOption.appendChild(txtNode);
				monthSel.appendChild(tmpOption);
				
			}
			
			if(j==1 || j==3 || j==5 || j==7 || j==8 || j==10 || j==12)
			{
				Nday=31
			}
			else if(j==4 || j==6 || j==9 || j==11)
			{
				Nday=30
			}
			else(j==2)
			{
				Nday=29
			}
			// else
			// {
				
			// }
			
			for(var k=1;k<=Nday;k++)
			{
				var tmpOption = document.createElement("option");
				var txtNode = document.createTextNode(i+"日");
				tmpOption.appendChild(txtNode);
				daySel.appendChild(tmpOption);
				
			}
			
		</script>
		
	</body>
</html>
